<%@include file="/inc/metaData.jsp"%>
<%@ page contentType="text/html;charset=UTF-8" language="java"  pageEncoding="utf-8" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset = UTF-8">
    <title>银行卡鉴权管理</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">

    <script type = "text/javascript">
        var param={
            cardNo:$("#id0").val(),
            memberTel:$("#id6").val(),
            expireYear:$("#id1").val(),
            expireMonth:$("#id2").val(),
            cvv:$("#id3").val(),
            memberName:$("#id4").val(),
            identityType:0,
            identityId:$("#id5").val()
        };
        function doBind(){
            var validCode = $("#id7").val();
            $.ajax({
                type:"post",
                url:${basePathContex}+"cardBind.do_?&validCode="+validCode,
                param:param,
                async:false,
                success:function(data){
                    if (data != 1) {
                        alert("请确认输入项,重新输入");
                    }
                }
            });
        }
        function doSendSms() {
            var sourceId = $("#sourceId").val();
            $.ajax({
                type:"post",
                url:${basePathContex}+"cardSendSms.do_",
                param:param,
                async:false,
                success:function(data){
                    if (data != 1) {
                        alert("请确认输入项,重新输入");
                    }
                }
            });
        }

        function doCheck() {
            var cardNo = $("#id0").val();
            var path = ${baseContextPath};
            alert(path);
           $.ajax({
                type:"post",
                url:${baseContextPath}+"doCheck.do_",
                param:cardNo,
                async:false,
                success:function(data){
                    if (data != 1) {
                        alert("重新输入卡号");
                    }
                }
            });
        }



    </script>
</head>
<body>
<%--<div><input type="hidden" id = "sourceId" value = "${sourceId}"/></div>--%>
<form id="queryBatchForm" action="${baseContextPath}cardBind.do_"  method="post">
    请输入卡号:<input type="text" id="id0" />
    <input type="button"  value = "验证卡号" onclick="doCheck()" /> <br />
    请输入手机号:<input type="text" id="id6"/><br />
<c:if test="${config2Show.isExpireTimeNeed ==1}">
    有效期年份:<input type="text" id="id1" /><br />
    有效期月份:<input type="text" id="id2" /><br />
</c:if>
<c:if test="${config2Show.isCVVNeed ==1}">
    CVV:<input type="text" id="id3" /> <br />
</c:if>
<c:if test="${config2Show.isPayerNameNeed ==1}">
    姓名:<input type="text" id="id4" /><br />
</c:if>
<c:if test="${config2Show.isIdentifyNoNeed ==1}">
    身份证号:<input type="text" id="id5" /><br />
</c:if>

   验证码:<input type="text" id="id7" />
    <input name="submitButton" type="button" value="发送验证短信" class="orange_btn_100"
           onclick="doSendSms();"/>
    <input name="submitButton1" type="button" value="绑定银行卡" class="orange_btn_100"
           onclick="doBind();"/>

</form>


</body>

</html>